<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Website</title>
<style>
html {
	margin: 0px;
	padding: 0px;
}

body {
	width: 100%;
	margin: 0px;
	padding: 0px;
	color: #000000;
	background-color: #ffffff;
	text-align: left;
}

a:link,a:active {
	text-decoration: none;
	padding: 4px 0px 4px 0px;
	color: blue;
}

a:hover {
	text-decoration: underline;
	color: red;
	padding: 4px 0px 4px 0px;
	font-size: 100%;
}

a:visited {
	text-decoration: none;
	color: blue;
}

#header {
}

#footer {
}

.section {
	margin: 16px;
}


</style>
</head>
<body>

<div id="header" style="border-top: 1px solid rgb(119, 153, 221); height: 16px; background-color: #c6d8ff; color: #000000;">
	<span style="font-weight: bold; font-size: x-large; margin-left: 32px;"></span>
</div>

<div id="page-content">

<div class="section">



<a href="#sect1">Website - a new way to use your phone</a>

<ul>

<li><a href="#ch1">Access your phone from a browser</a></li>
<li><a href="#ch2">Share and explore contents over peer networks</a></li>
<li><a href="#ch3">Use proxy on Google app engine</a></li>
<li><a href="#ch4">Connectivity</a></li>
<li><a href="#ch5">Security and access control</a></li>
<li><a href="#ch6">Website applications</a></li>

</ul>

<a href="#sect2">Developing applications for Website</a>

<ul>
<li><a href="#ch6">To get started...</a></li>
</ul>

</ul>

<h3 id="sect1">Website - a new way to use your phone</h3>


<h4 id="ch1">Access your phone from a browser</h4>

+ Connect your phone to Wi-Fi <br />
+ Make sure HTTP service is running <br />
+ If connected and running, Website address will be shown on your phone. Enter the URL in your browser's address bar or use Website proxy.<br />
+ To see more than a home page, you need to at least set a password for your master account so you can login from your browser. <br />

<p>
Optional but recommended: <br /><br />
+ Update your site info: name, avatar, and a welcome message<br />
+ Wi-Fi Settings/Advanced/Wi-Fi sleep policy/Never<br />
</p>


<p>
Browser support: <br /><br />
Website has only been tested on Windows for the following browser/versions: Mozilla Firefox 3.6,  Google Chrome 10.0, Internet Explore 8.0.

<br /> The above browsers or higher versions are recommended. Other browsers may work but will not be supported.
</p>



<h4 id="ch2">Share and explore contents over peer networks</h4>

<p>
You can share your Website applications and contents on your phone with your friends instantly over IM peer networks. 
Currently only XMPP/Jabber protocol is supported.
You will need an XMPP account. If you have a Gmail/Gtalk account, you have already got one (Gtalk is XMPP); it is recommended
that you create a separate dedicated account for Website exclusive use.
</p>

<p>
Before you can start XMPP service, as a minimum, you will need to provide your ID (e.g. your Gtalk/Gmail email address) and password; all other XMPP settings are optional if you use Gtalk.
</p>

+ Add your friends as peer<br />
+ Convince your friends to install Website and add you as theirs<br />
+ Start XMPP service<br />
+ Visit and explore your friends' phone if they become available (green star in peers list) and proper access permissions have been granted.<br />

<p>
Optional but recommended: <br /><br />
+ Check "Share peers with peers" so your friends can see and visit your friends<br />
</p>

<p>
Please note: you will not see your friends as available unless they have installed Website and started the XMPP service even they may
appear as available for chat on other IM clients. <br />
You may also need to refresh the web page if you are using a browser.
</p>

<h4 id="ch3">Use proxy on Google app engine</h4>

<p>
Each time you reconnect to WiFi, you may get assigned a different IP address. You need to enter the new IP to access your
Website applications.
</p>

<p>
If you enable Website proxy, an entry will be added to your peer list (hotwebproxy@appspot.com). You may always
let the proxy figure out your real IP address (and the port if you changed the default 10080)
</p>

<p>
Point your browser at <a href="http://hotwebproxy.appspot.com/">http://hotwebproxy.appspot.com/</a> 
and enter your peer id (JID) or your friends', you will be redirected
to your real IP and port. Please note however that as of the current release, your desktop browser must be
on the same local network (or reachable) as that of the phone you want to access.
</p>

<h4 id="ch4">Connectivity </h4>
<p>

Keep in mind that accessing and sharing your phone from a browser may consume your data plan. If you have a limited data plan, 
turn it off (Settings/Wireless & network settings/Mobile networks/Data enabled) temporarily to allow only WiFi access, 
or restrict access to certain applications and to select peers.<br /><br />

For public WiFi hotspot (e.g. at airport, in a hotel, in your office or on your clients site)  
you may be required to agree to its terms & conditions by first visiting the provider's web site from a browser. 
You may never see this page if you have your mobile data network enabled.
Disabling mobile data network will force your browser to redirect to the provider's terms page. Following 
the instructions on the page, once you are able to access an external web site (such as http://google.com)
from your browser, you should be able to start up Website services and access your phone from a browser.
<br /><br />

Some free WiFi may restrict access and Website HTTP/XMPP services may not work. 

</p>


<h4 id="ch5">Security and access control</h4>

<p>
To access your phone from a browser over HTTP, user must login and be authenticated. To access over XMPP, peer is automatically authenticated
if they are in your peers list.
</p>

<p>
However users/peers will not be able to access any of the applications and contents on your phone unless you have also authorized and granted them the permissions.
</p>

<p>
Website provides fine-grained user access control.
</p>

<ul>
<li>Phone access control </li>
<li>Application access level </li>
<li>Label access permission </li>
</ul>

<h4>Access control</h4>
<p>Master, shared, and public for your phone. If unchecked, the type of access will be blocked. Login will fail. 
By default, only master access is turned on. To disable master access
from remote browsers, uncheck master access control.</p>

<p>For shared access, you need to create user accounts in addition to enabling the shared access control. As a minimum, you need to provide user id
and password. Passwords are not stored on your phone, only their hash values. Reset if you have forgotten the password.</p>

<p>If you enable public access, visitors will not be able to access any of your applications 
until you have also set their access level and label permissions to public.</p>

<h4>Access level</h4>
<p>None, master, shared, or public for applications. An application's access level must be public to allow guest access. If access level is set to none,
all access will be blocked including master access to the application. By default, application access level is set to master.</p>

<h4>Access permission</h4>
<p>Like application access level: none, master, shared, or public but for labels. 
A label is a grouping of resources in an application such as folders for file managers, groups for contacts, 
frames for E*Frame...

For shared permission, you also need to provide the list of user ids (email address/JID) for the label.  By default, only master is granted access permissions
to the labels.

</p>

<p>
To publish the contents under a label, you need
to set the access permission to public for the label, the access level to public of the application the label belongs to, and 
the site public access control is turned on; and of course, your Website HTTP/XMPP service must be running and your phone is connected to the nework e.g via Wi-Fi.

</p>

<p>By now you should know, you, the owner of the phone, are the "Master". You may change both the user id and the password for the master account.
"master" is the default user id; you have to set the password before you can login remotely.
</p>

<p>For shared access, add your family, co-workers, and friends to your peer list.</p>

<h4 id="ch6">Website applications</h4>

<p>
Currently the following applications are Website enabled. You can access them from a remote desktop browser via Wi-Fi
in your home, at work, or any where in the world with a Hotspot.
</p>

<ul>
<li ><a href="http://market.android.com/details?id=info.niwota.home">Home Fling 2.0</a> (Free)</li>
<li ><a href="http://market.android.com/details?id=info.niwota.webime">Web Input 1.0</a> (Free)</li>
<li ><a href="http://market.android.com/details?id=info.niwota.profile">Profile 1.0</a> (Free)</li>
<li ><a href="http://market.android.com/details?id=info.niwota.webshot">Webshot 2.0.0</a> (Free)</li>
<li ><a href="http://market.android.com/details?id=info.niwota.fwrite">Frite 2.0.0 (Finger Writer)</a> (Free)</li>
<li ><a href="http://market.android.com/details?id=info.niwota.frames">E*Frame 2.0.0</a> (Ads) </li>
<li ><a href="http://market.android.com/details?id=info.niwota.install">APK Install 1.0.0</a> (Free) </li>

</ul>

<p>The following stock applications are simply redirected to their web twins</>

<ul>
<li><a href="/web/com.android.browser.html">Browser</a>  home page of your hosting browser</li>
<li><a href="http://www.google.com/calendar/render">Calendar</a>  http://www.google.com/calendar/</li>
<li><a href="http://mail.google.com/mail/?#contacts">Contacts/Phone</a>  http://mail.google.com/mail/?#contacts</li>
<li><a href="/web/com.android.email.html">Email</a>  Gmail, Yahoo! Mail, Hotmail</li>
<li><a href="http://mail.google.com/mail/?#inbox">Gmail</a>  http://mail.google.com/mail/?#inbox</li>
<li><a href="http://www.google.com/search">Google Search</a>  http://www.google.com/search</li>
<li><a href="http://maps.google.com/maps">Maps</a>  http://maps.google.com/maps</li>
<li><a href="http://www.android.com/market">Android Market</a>  http://www.android.com/market</li>
<li><a href="http://www.google.com/talk/">Talk</a>  http://www.google.com/talk/</li>
<li><a href="http://voice.google.com/">Google Voice</a>  http://voice.google.com/</li>
<li><a href="http://www.youtube.com/">YouTube</a>  http://www.youtube.com/</li>
</ul>


</div>

<div class="section">

<h3 id="sect2">Developing applications for Website</h3>

<p>Website is a web application server for Android applications. It runs HTTP and XMPP services, collaborates with other Android applications,
 and delivers contents on the phone to web browsers and peers.
</p>
<p>
Whether or not you have done any server side programming, it is straightforward to enable
web access for your Android application through Website.
</p>

<p>If you have a J2EE background,
it certainly would help but is not required. Website communicates with Android applications via the standard
<a target="android" href="http://developer.android.com/guide/topics/providers/content-providers.html">Content Provider</a> framework, no need for Servlet or JSP. 
However, you do need
to know or learn some HTML basics, Javascript/AJAX, CSS  in addition to Android programming.</p>

<p>The recommended way for generating dynamic contents is static HTML templates with AJAX calls to populate dynamic data. That being said,
nothing stops you from using traditional template engine approach: JSP, Velocity, <a href="http://code.google.com/p/blacktea/">Blacktea</a> - Yes, I created one too amongst the thousands ;-).
</p>

<h4 id="ch6">To get started...</h4>


<ul>
<li>Download <a href="/src/hotwebapp-api.zip">Website Application Library</a>
</li>

<li>Add Website Application Library to your Android application project.
</li>
<li>Download <a href="/src/hotwebdev.zip">Demo App</a> - a "Hello, World!" Android application that supports Website</a>. 
Use the demo app as your starting point.
</li>
<li>Contact <a href="mailto:liqiang@gmail.com?subject=Website Application Library Help">me</a> for help</li>
</ul>

<p>
All that is required is to write a page content provider with an authority of your package name, you can subclass PageContentProvider which has done most
low level work so you can focus on presenting your application logic. To support granular access permission if appropriate, you 
should consider implementing LabelContentProvider (authority name with .acl appended to your package name).
</p>


<p>
The following resources have been made available to all Website applications:

<ul>
<li><a href="/icon/index" target="_blank">Application icon</a></li>
<li><a href="/drawable/index" target="_blank">Android drawable</a></li>
<li><a href="/assets/index" target="_blank">Browse Website assets</a></li>
</ul>
</p>
</div>


<div class="section">			
<p bgcolor="#f3f6fb">
Thank you for your support. If you have any question, comment, or suggestion, please
feel free to contact me any time at <a href="mailto:liqiang@gmail.com?subject=Website+Comment">liqiang@gmail.com</a>
</p>
</div>

</div>

<div id="footer">
<div style="border-bottom: 1px solid rgb(119, 153, 221);"></div>


<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tbody>
		<tr>
			<td ><span style="margin-left: 16px;">Website &copy; 2010 All rights reserved.</span>
			</td>
		</tr>
	</tbody>
</table>
</div>
</body>
</html>
